/**
 * Copyright (c) Daniel Centore
 *
 * ex: set filetype=java expandtab tabstop=4 shiftwidth=4 :
 *
 * This program is free software: you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation, either version 3 of
 * the License, or (at your option) any later version.
 *
 * This code is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * This code is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published
 * by the Free Software Foundation.
 */
package ronp.anim.gui.tools;

import java.awt.image.BufferedImage;

import ronp.anim.data.Grip;
import ronp.anim.data.filmstrip.Layer;

/**
 * Represents a single tool that we can draw with
 * 
 * @author Daniel Centore
 *
 */
public abstract class Tool
{

	/**
	 * Called when the mouse is pressed
	 * @param x X and Y coordinates of the press relative to zoom
	 * @param y
	 */
	public abstract void mousePressed(int x, int y);

	/**
	 * Called when the mouse is released away from a grip
	 * @param x X and Y coordinates of the press relative to zoom
	 * @param y
	 */
	public abstract void mouseReleased(int x, int y);

	/**
	 * Called if the mouse is released on a grip
	 * @param l The {@link Layer} representing the {@link Grip} we released on
	 * @param x X and Y coordinates of the press relative to zoom
	 * @param y
	 */
	public abstract void gripSelected(Layer l, int x, int y);

	/**
	 * Gets an overlay image to aid the user in drawing (or null if none)
	 * @param x Current X and Y coordinates of the mouse
	 * @param y
	 * @return A {@link BufferedImage} to overlay or null
	 */
	public abstract BufferedImage getOverlay(int x, int y);

}
